/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Figuras;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;

/**
 *
 * @author Administrador
 */
public class InformacionVidas extends Figura {

    private String texto;
    private int iVidas;

    public InformacionVidas(int x0,int y0, String text, int lives, Color col,Lienzo l){
        super(x0,y0,0,0,col,l);
        texto=text;
        iVidas=lives;
   }

   public void setVidas(int lives){
       iVidas=lives;
   }
   public void setTexto(String text){
       texto=text;
   }
   public String getTexto(){
       return texto;
   }

   @Override
   public void dibujate(Graphics g) {
        Class[] arg =new Class[1];
        arg[0]= Graphics.class ;
        if(Boolean.valueOf(this.texto.equals(lienzo.getUserName()))){
            Graphics2D g2= (Graphics2D)g;
            g2.setPaint(color);
            Font font = new Font("Serif", Font.PLAIN, 20);
            g2.setFont(font);
            g2.drawString(texto.concat(": "+iVidas) , x, y);
        }
   }

    @Override
    public String toString(){
        return "InformacionVidas";
    }

    @Override
    public void colisionoCon(Bala c) {
    }

    @Override
    public void colisionoCon(CirculoBomba c) {
    }

    @Override
    public void colisionoCon(Cuadrilatero c) {
    }

    @Override
    public void colisionoCon(Figura c) {
    }

    @Override
    public void colisionoCon(Pared c) {
    }

    @Override
    public void colisionoCon(Movil c) {
    }

    @Override
    public void colisionoCon(ParedH c) {
    }

    @Override
    public void colisionoCon(ParedV c) {
    }

    @Override
    public void colisionoCon(CirculoVida c) {
    }
}
